<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>微博</title>
    <link rel="stylesheet" href="../static/css/bootstrap.css" th:href="@{/css/bootstrap.css}">


</head>
<body>


<!--顶部导航 start===-->
<!--沾满全部宽度-->
<div class="container-fluid fixed-top"  >
    <!--<ul>-->
        <span>  <a th:href="@{/u/to/register}">注册</a>  </span>
        <span><a th:href="@{/u/to/login}">登陆</a></span>
        <span>
            <input type="text" name="searchContent" ><button id="searchBtn">搜索</button>
        </span>
    <span th:if="${session.user} != null"  >
        <span >
            <span>用户名 <span th:text="${session.user.nickname}"></span></span>
            <a th:href="@{'/u/follows/'+${session.user.id}}"><span>关注 <span th:text="${session.user.totalFocus}"></span></span></a>
            <a th:href="@{/u/fans}"><span>粉丝 <span th:text="${session.user.totalFans}"></span></span></a>


        </span>
    </span>
    <!--</ul>-->
</div>
<!--顶部导航 end===-->

<!--侧边导航start===-->
<div class="position-fixed" style="left: 450px;top: 30px;">
    <ul>
        <li><a href="#">哈哈哈</a></li>
        <li><a href="#">哈哈哈</a></li>
        <li><a href="#">哈哈哈</a></li>
        <li><a href="#">哈哈哈</a></li>
        <li><a href="#">哈哈哈</a></li>
    </ul>
</div>
<!--侧边导航end===-->
<!--主题内容区域start====-->
<!--普通container -->
<div class="container" style="height: 2000px;position: relative; top:30px;">
    <div class="row" id="post_form_div">
        <div class="col-7 offset-3">
            <form  method="post" th:action="@{/p/post}" id="post_form" >
                <textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea>
                <!--<input type="submit" value="发布">-->
                <input type="button" value="发布">
            </form>
        </div>

    </div>

    <div  th:each="obj:${posts}" >
        <div class="row" >
            <div class="col-7 offset-3" th:text="${obj.user.nickname}">
            </div>

        </div>
        <div class="row" >
            <!--${#dates.format(date)}-->
            <div class="col-7 offset-3" th:text="${#dates.format(obj.createTime)}">
            </div>
        </div>
        <div class="row" >
            <div class="col-7 offset-3" th:text="${obj.content}">
            </div>
        </div>
    </div>

</div>
<div class="container">

</div>
<!--主题内容区域end====-->
<script
        src="https://code.jquery.com/jquery-3.3.1.js"
        integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
        crossorigin="anonymous"></script>
<script src="../static/js/home.js" th:src="@{/js/home.js}"></script>
</body>
</html>